<template>
	<view class="content">
		<view class="header">
			<view>蜜雪新喝法，两杯DIY!</view>
		</view>
		<view class="image" v-for="(item,index) in articleImgList" :key="index">
			<image :src="'http://localhost:8080/api/img/'+item" mode="widthFix"></image>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				articleImgList: []
			};
		},
		onLoad() {
			this.getArticle()
		},
		methods: {
			async getArticle() {
				let res = await uni.$http.good.reqGetAticleImg();
				if (res.code == "200") {
					this.articleImgList = res.data.images.replace(/\[|\]/g, "").replace(/\s+/g, "").split(",");
				}
			}
		}
	}
</script>

<style lang="scss">
	.content {
		background-color: #fff;

		.header {
			font-size: 24px;
			padding-top: 7px;
			padding-left: 6px;
			// font-weight: 700;
			margin-bottom: 10px;
		}

		image {
			width: 100%;
			display: block;
		}
	}
</style>
